The smaller of a and b.
min(a, b) -> real| Name | Type |
|---|---|
a | real |
b | real |
real
The smaller of a and b.
Given two whole numbers, min hands back a whole number; if either one is a decimal, the answer is a decimal. min_int does the same for whole numbers but refuses a decimal outright.
hsp = min(hsp + 1, 3);Accelerates this object rightward by 1 every frame, but never past a top speed of 3 - once hsp + 1 would go higher than 3, min keeps handing back 3 instead. See max for capping the other direction, and clamp for both at once against two fixed bounds.
One comparison - as cheap as this group gets, safe to call every frame.
A direct call to the GBA module’s own min - one comparison. When both numbers are whole numbers the answer is a whole number too; if either is a decimal the answer is a decimal. min_int is the same call, for when you want a decimal refused outright.